package com.yhn.bff.driver.controller;

import cn.dev33.satoken.stp.StpUtil;
import com.yhn.bff.driver.dto.req.RegisterNewDriverReqDTO;
import com.yhn.bff.driver.service.DriverService;
import com.yhn.hxds.common.model.BaseResponse;
import com.yhn.hxds.common.model.ResultUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yhn
 * @version 1.0
 * @description
 * @date 2024/9/16 13:18
 */
@RestController
@RequestMapping("/driver")
@Tag(name = "DriverController", description = "司机模块Web接口")
public class DriverController {
    @Resource
    private DriverService driverService;

    @PostMapping("/registerNewDriver")
    @Operation(summary = "新司机注册")

    public BaseResponse<String> registerNewDriver(@RequestBody @Valid RegisterNewDriverReqDTO requestParam) {
       return ResultUtils.success(driverService.registerNewDriver(requestParam));
    }
}
